<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if IE 8]> <html lang="zh-CN" class="ie8"> <![endif]-->
<html lang="zh-CN">

	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>{$shop_info.title}</title>
		<meta content="telephone=no,email=no,address=no" name="format-detection" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="msapplication-tap-highlight" content="no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta name="wap-font-scale" content="no" />
		<meta name="Keywords" content="{$shop_info.keywords}" />
		<meta name="Description" content="{$shop_info.description}" />

		<meta name="is_webp" content="no" />
		
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/common.css" />
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/dropload.css" />
		<!--整站改色 _start-->
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/color-style.css" />
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.cookie.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/layer.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.method.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.modal.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.widget.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/common.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.tablelist.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/goods.js"></script>
		<!-- 图片缓载js -->
		<script src="/themes/wnsc_moblie/Public/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/jquery.lazyload.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/swiper-3.4.2.min.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/css/dropload.js"></script>

         <?php
            $agent=$_SERVER['HTTP_USER_AGENT'];
			if(strpos($agent,"Html5Plus")  > -1){
         ?>
   		   <script src="/themes/wnsc_moblie/Public/js/plusShare.js" type="text/javascript" charset="utf-8"></script>
       <?php
          }
         ?>
		
		
		
		<script type="text/javascript">
				 function getCountDown(timestamp,id){
	            setInterval(function(){
	                var nowTime = new Date();
	                var endTime = new Date(timestamp * 1000);
	
	                var t = endTime.getTime() - nowTime.getTime();
	 				var hour=Math.floor(t/1000/60/60%24);
	                   var min=Math.floor(t/1000/60%60);
	                   var sec=Math.floor(t/1000%60);
	    
	                if (hour < 10) {
	                     hour = "0" + hour;
	                }
	                if (min < 10) {
	                     min = "0" + min;
	                }
	                if (sec < 10) {
	                     sec = "0" + sec;
	                }
	                var countDownTime = hour + ":" + min + ":" + sec;
	                $("#"+id).html(countDownTime);
	            
	            },1000);
	        }
		</script>
		<style type="text/css">
			#cover{display:none;position:fixed;left:0;top:0;z-index:18888;background-color:#000000;opacity:0.7;width: 100%;height: 100%;}
			#guide{display:none;position:fixed;right:18px;top:5px;z-index:19999;}
			#guide img{width:260px;height:180px;}
			.qr-code{
				position: absolute;
				right: 10px;
				top: 10px;
				width: 50px;
				height: 50px;
				display: block;
				cursor: pointer;
				z-index: 2;
			}
			.qr-code i{
				width: 50px;
				height: 50px;
				background: url(/themes/wnsc_moblie/newMobile/Shop/images/share.png) no-repeat;
				 background-size: 50px;
				display: block;
				background-color:rgba(0, 0, 0, 0.34);
			
				border-radius: 50px;
			}
		</style>
	</head>

	<body>
		<!-- 内容 -->
		<div id="index_content">

			<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/goods.css" />
			<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/bonus_message.css" />
			<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/swiper-3.4.2.min.css" />
            <link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Crowdfunding/css/crowdfunding.css" />

			<!----------------------------------header----------------------------------->
			<div class="goods-header">
				<div class="goods-header-left">
						<php>if($_GET['type']==1){</php>
							<a href="{:U('list/coupons')}"></a>
						<php>}else{</php>
							<a href="javascript:history.back(-1)"></a>
						<php>}</php>
					
				</div>
				<ul class="goods-header-nav">
					<li class="cur">商品</li>
					<li>详情</li>
					<li>评价</li>
				</ul>
				<php>$rs_type=shop_type($_GET['id']);</php>
				<div class="goods-header-right">

					<aside class="show-menu-btn">
						<div class="show-menu" id="show_more">
							<a href="javascript:void(0)"></a>
						</div>
					</aside>
				</div>
			</div>
			<mtc_include file="Public:right_nav" />
			<!--商品-->
			<div class="goods-content user-goods-ka">
				<php>if($rs_type['tuan']==1){</php><img src="/static/images/tuan.png" alt="此商品参与团购" style="position: absolute;z-index: 101;width:50px; height: auto;left:0px;"/><php>}</php>
				<div class="swiper-container swiper-container-horizontal" id="goods_pic">
					<div class="swiper-wrapper SZY-GOODS-IMAGE">
						<php>
							$arr_img=json_decode($arr_img,true);

						</php>
						<foreach name="arr_img" item="v">
							<div class="swiper-slide">
								<a href="javascript:void(0)">
									<img title="" width="100%" src="{$v[0]}">
								</a>
							</div>
						</foreach>
			
					</div>
					<div class="swiper-pagination"></div>
					<?php
						$agent=$_SERVER['HTTP_USER_AGENT'];
						
						if(strpos($agent,"Html5Plus")  > -1){
					?>
					<a href="javascript:void(0)" class="qr-code" onclick="myshare()">
						<i></i>
					</a>
					<?php
					}
					?>
				</div>
				<script type="text/javascript">
					var swiper = new Swiper('#goods_pic', {
						pagination: '.swiper-pagination',
						paginationClickable: true,
						autoplay: 3000,
						lazyLoading: true,
						autoplayDisableOnInteraction: true,
						// paginationType: 'fraction',
						onTouchEnd: function(swiper, event) {
							if(swiper.isEnd && (swiper.touches.startX - swiper.touches.currentX) > 150) {
								$('.goods-header-nav li').eq(1).click();
							}
						}
					});
				</script>
				<!------------------------------商品详情 start------------------------------->

				<!-- 商品团购倒计时 -->

				<div class="goods-info">
					<div class="goods-info-top">
						<h3 class="SZY-GOODS-NAME"><php>if($rs_type['coupon']==1){</php><em style="background-image: url('/static/images/yhq.png');padding: 3px 5px 4px 11px;color: #fff;background-size: 100% 100%;margin-right: 5px;font-size: 12px;">优惠券</em><php>}</php>{$shop_info.title}</h3>
							<php>if(($shop_info['redenvelope']>0&&$shop_info['envelope_type']==0)||($shop_info['envelope_product_id']>0&&$shop_info['envelope_type']==1)){</php>	
					
							<php>
								if($web_daiyan>=$shop_info['redenvelope']){
									$shop_info['redenvelope']=round($shop_info['redenvelope']/$shop_info['price'] * 100 , 2) . "％";
								}else{
									$shop_info['redenvelope']='￥'.$shop_info['redenvelope'];
								}

							</php>
							<php>if($shop_info['tuanselect']==0){</php>
								<php>if($shop_info['envelope_type']==0){</php>
								<span class="daiyan">
									代言红包<br/>{$shop_info['redenvelope']}
								</span>
								<php>}else{</php>
								<span class="daiyan">
									代言礼包
								</span>
								<php>}</php>
							<php>}else{</php>
								<php>if($shop_info['envelope_type']==0){</php>
								<span class="daiyan" style="background: #fbca60 ;">
									代言红包<br/>{$shop_info['redenvelope']}
								</span>
								<php>}else{</php>
								<span class="daiyan" style="background: #fbca60 ;">
									代言礼包
								</span>
								<php>}</php>
							<php>}</php>
									
						<php>}</php>
					</div>
					<span class="goods-depict color"></span>
				
					<div class="goods-price">
						<div class="now-prices">
							<em class="SZY-GOODS-PRICE price-color">￥{$shop_info.price}</em>
							<del class="SZY-MARKET-PRICE">￥{$shop_info.oprice} </del>
                          	<php>
										$daiyan_price=get_daiyan_price($_GET['id']);
										if($daiyan_price&&$shop_info['dikouquan']>0){
									</php>
										<span style="color: #ff9100;">抵扣券  ￥{$shop_info.dikouquan}</span>
									<php>}</php>
						</div>

						<span class="sold">销量：{$shop_info.sale_num}件</span>


					</div>
					<div>
						<php>
							$envelope_product=get_shop_info($shop_info['envelope_product_id']);
							if($shop_info['envelope_type']==1){
						</php>
							<span style="padding: 0 11px;font-size: 12px;">礼包详情：<a href="{:U('shop/index',array('id'=>$shop_info['envelope_product_id']))}" style="color: red;">{$envelope_product.title}</a></span>
						<php>}</php>
					</div>
					<div>
							<span style="padding: 0 11px;font-size: 12px;">
							运费：
							<php>
								if($shop_info['goods_freight']==0&&$shop_info['transport_id']==0){
										echo "<font style='color: red'>免运费</font>";
										}
										if($shop_info['goods_freight']!=0&&$shop_info['transport_id']==0){
										    echo "￥".$shop_info['goods_freight'];
										}
										if($shop_info['transport_id']!=0){
										    echo '运费根据区域,会有所差异,可在下单时查看运费';
										}
							</php>

						</span>
					</div>
					<notempty name="shop_content_info.story_title"><p style="padding: 5px 10px;border-top: 1px solid #ebedf0;"><a href="{:U('shop/store',array('id'=>$_GET['id']))}" style="color:red">{$shop_content_info.story_title}</a></p></notempty>
					<!-- 服务承诺 -->
					<php>if($new_rs_tuan){</php>
					<div id="tuan">
						<p style="padding: 10px 0;">以下小伙伴正在发起团购，您可直接参与</p>
						<ul>
							<foreach name="new_rs_tuan" item="v">
								<php>
									$city_info=getCityInfo($v['buyer_city']);
								</php>
								
								<li>
									<img src="{$v.user_pic}" class="pic"/>
									<span class="info">{$v.buyer_name}<br/>{$city_info.city_name}</span>
									<span class="ctuan" data="{$v.order_id}" style="cursor: pointer;">
										去参团
									</span>
									<script type="text/javascript">
										getCountDown({$v['payment_time']+60*60*24},'time_{$key}');
									</script>
									<span class="info_r">还差{$v.num}人成团<br/><p style="margin:0px">剩余<em id="time_{$key}"></em></p></span>
								</li>
							</foreach>
						
						</ul>
					</div>
					<php>}</php>
					<!-- 优惠券 -->
					<php>if($coupons){</php>
					<div class="shop-prom" onclick="select_coupon()">
						<div class="shop-prom-title">
							<dt>领优惠券</dt>
							<span class="more">
								<i class="iconfont">&#xe607;</i>
							</span>
						</div>
					</div>
					<php>}</php>
				</div>
                <php>if(!empty($crowdfunding)):</php>
                <div class="project-introduce">
                    <!-- 众筹中等其他状态 -->
                    <!-- 非永久 -->
                    <div class="p-bar">
                        <div style="width:{$crowdfunding.percent}%" class="p-bar-green"></div>
                    </div>
                    <p class="p-progress">
                        <span class="fl percent" style="color: rgb(47, 214, 162);">当前进度{$crowdfunding.percent}%</span><span class="fr">{$crowdfunding.num}名支持者</span>
                    </p>

                    <p class="p-target" id="projectMessage">
                        此项目必须在
                        <span class="f_red">{$crowdfunding.end_time|strtotime|date="Y",###}年{$crowdfunding.end_time|strtotime|date="m",###}月{$crowdfunding.end_time|strtotime|date="d",###}日</span>前得到
                        <span class="f_red"><i>￥</i>{$crowdfunding.total_money}</span>的支持才可成功！
                        剩余<span class="f_red"> {$crowdfunding.surplus_time}</span>天!</p>

                    <!--订阅 end-->
                </div>
                <php>endif;</php>
				<div class="blank-div"></div>
				<!--已选-->

				<div class="selected-attr SZY-GOODS-SPEC">
					<div class="selected-attr-content" onClick="select_spec('add-cart')">
						<dt>已选</dt>
						<a>
							<i class="i_dd"></i>
							<span class="more">
								<i class="iconfont">&#xe607;</i>
							</span>
						</a>
					</div>
				</div>
				<div class="blank-div"></div>
				<!-- 店铺信息 _star-->
				<div class="store-info">
					<div class="store-top">
						<a href="{:U('store/index',array('id'=>$store_info['id']))}">
							<div class="store-logo">
								<img src="{$store_template_info.logo}">
							</div>
							<div class="store-name">
								<span>
								{$store_info.title}
								</span>

							</div>
						</a>
					</div>
					<ul class="score-detail clearfix">
						<a href="{:U('store/index',array('id'=>$store_info['id']))}">
							<li>
								<span class="num">{$shop_count}</span>
								<span class="text">全部宝贝</span>
							</li>
						</a>
						<li>
							<span class="num">{$shop_store_count}</span>
							<span class="text">关注人数</span>
						</li>
						<li>
							<p>
								<em>描述相符</em>
								<i class="color">{:number_format($store_info['store_desccredit'], 2, '.', '')}</i>
							</p>
							<p>
								<em>服务态度</em>
								<i class="color">{:number_format($store_info['store_servicecredit'], 2, '.', '')}</i>
							</p>
							<p>
								<em>发货速度</em>
								<i class="color">{:number_format($store_info['store_deliverycredit'], 2, '.', '')}</i>
							</p>
						</li>
					</ul>

					<div class="store-btn" style="margin-top: 3px;">
						<!-- 收藏店铺 -->
						<a href="javascript:void(0);" class="collect-store" store="{$store_info['id']}">
							<php>if($rsstoreinfo_status==1){</php>
							<em class="collected-shop-bg">&nbsp;</em>
							<span>已关注</span>
							<php>}else{</php>
							<em class="collect-shop-bg">&nbsp;</em>
							<span>关注本店</span>
							<php>}</php>
						</a>
						<!-- 进入店铺 -->
						<a href="{:U('store/index',array('id'=>$store_info['id']))}">
							<em class="goto-shop-bg">&nbsp;</em>
							<span>进入店铺</span>
						</a>
					</div>
				</div>
				<script type="text/javascript">
					// 添加收藏
					$(".collect-shop").click(function(event) {
						var target = $(this);
						var shop_id = "7";
						$.loading.start();
						$.collect.toggleShop(shop_id, function(result) {
							$.loading.stop();
							if(result.data == 1) {
								$(target).html("<em class='collected-shop-bg'>&nbsp;</em><span>取消关注</span>");
							} else {
								$(target).html("<em class='collect-shop-bg'>&nbsp;</em><span>关注本店</span>");
							}
						});
					});
				</script>
				<!-- 店铺信息 _end-->
				<div class="scroll-tips" style="display: none">
					<div class="line"></div>
					<span class="text">
						<i class="icon"></i>
						点击进入商品详情
					</span>
				</div>
			</div>
			<!--详情-->
			<div class="blank-div"></div>
			<div class="goods-desc-main user-goods-ka" style="display: none;">
				<div class="product_images product_desc product_tab" id="product_desc">
					<!-- 商品规格参数 -->

					<table class="attribute-table">
						<tbody>
							<foreach name="shop_content_info['config']" item="v">
								<tr>
									<td>{$v.title}</td>
									<td>{$v.content|default='其他'}</td>
								</tr>
							</foreach>
						</tbody>
					</table>

					<div class="detail-content goods-detail-content product_tab_chr">
						<div class="more-loader-spinner">
							{$shop_content_info.content}
						</div>
					</div>
					<!-- 售后保障 start -->
					<php>
						$page=get_page(30);
					</php>
					<div style="width: 96%;border-top: 1px solid #e5e5e5;padding: 2%;line-height: 25px;margin: 0 auto;">
						{$page.post_content|htmlspecialchars_decode}
					</div>
					<!-- 售后保障 end -->
					<div class="tip-space-box hide">
						<div class="tip-space">
							<div class="tip-space-botd">
								<div></div>
							</div>
							<div class="tip-space-bott">
								<i class="bott-left"></i> 已经看到最后了
								<i class="bott-right"></i>
							</div>
						</div>
						<div class="blank-div"></div>
					</div>
				</div>
			</div>
			<!--用户评价-->
			<div class="goods-evaluate user-goods-ka" id="goods-evaluate" style="display: none">
			
				<script src="/themes/wnsc_moblie/newMobile/Shop/js/klass.min.js"></script>
				<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/photoswipe.css">
				<script src="/themes/wnsc_moblie/newMobile/Shop/js/photoswipe.js"></script>
				<div class="comment-type">
					<ul class="tab">
						<li data-type="0" class="cur">
							<em>{$good_evaluate_count+$zhong_evaluate_count+$bad_evaluate_count}</em>
							<a href="javascript:void(0)" >全部评价</a>
						</li>
						<li data-type="2" class="">
							<em>{$good_evaluate_count}</em>
							<a href="javascript:void(0)">好评</a>
						</li>
						<li data-type="3" class="">
							<em>{$zhong_evaluate_count}</em>
							<a href="javascript:void(0)">中评</a>
						</li>
						<li data-type="4" class="">
							<em>{$bad_evaluate_count}</em>
							<a href="javascript:void(0)">差评</a>
						</li>
						<li data-type="1" class="">
							<em>{$img_evaluate_count}</em>
							<a href="javascript:void(0)">晒图</a>
						</li>
					</ul>
				</div>
				<!--有商品评价时-->

				<div class="comment-content" id="J_ItemList"  style="opacity: 1;">
					
					<div class="tablelist-append single_item info" ></div>
						<a href="javascript:;" class="get_more"></a>
				</div>
				
				<!-- 返回顶部 -->
				<a href="javascript:void(0);" id="back-to-top" class="gotop hide"><img src="/themes/wnsc_moblie/newMobile/Shop/images/topup.png"></a>
				<script>
					$(document).ready(function() {
						<php>if($_GET['lin']){</php>
							select_coupon();
						<php>}</php>
						//首先将#back-to-top隐藏
						$("#back-to-top").addClass('hide');
						//当滚动条的位置处于距顶部1000像素以下时，跳转链接出现，否则消失
						$(function() {
							$(window).scroll(function() {
								if($(window).scrollTop() > 800) {
									$("#back-to-top").removeClass('hide');
								} else {
									$("#back-to-top").addClass('hide');
								}
							});
							//当点击跳转链接后，回到页面顶部位置
							$("#back-to-top").click(function() {
								$('body,html').animate({
									scrollTop: 0
								}, 600);
								return false;
							});
						});
					});
				</script>
			
				<script type="text/javascript">
					
					$(function() {
					
						$('body').on('click', '#gallery a',function() { 
							var src =$(this).attr('data');
						 //自定义标题风格
						  layer.open({
						  	type: 1,
						    content: '<img src="'+src+'" style="width:100%">',
						    style: 'position:fixed; bottom:0; left:0; width: 100%; height: 200px; padding:10px 0; border:none;'
						  });
						});
						$('body').on('touchstart', '.layui-layer-shade',function() { 
							layer.closeAll();
						});
						
						$('.tab li').click(function(){
							$('.tablelist-append').empty();
							$('.dropload-down').remove();
							var type=$(this).attr('data-type');
							get_comment(type);
							$(this).siblings('li').removeClass('cur');
							$(this).addClass('cur');
							
						})
						
					});
					function get_comment(type){
						var last=0;
						var amount=6;
						var url = "{:U('shop/comment',array('id'=>$_GET['id']))}";
						if(type){
							var last=0;
							var datatype=type;
						}else{
							var datatype=0;
						}
						
						$('.dropload-down').remove();
						
						$('#J_ItemList').dropload({
							scrollArea : window,
							domDown: {
					            domClass: 'dropload-down',
					            domRefresh: '<div class="dropload-refresh">上拉加载更多</div>',
					            domLoad: '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
					            domNoData: '<div class="dropload-noData">已无数据</div>'
					        },
							loadDownFn : function(me){
								$.ajax({
						            type: 'GET',
						            url: url,
						            data:{last:last,amount:amount,datatype:datatype},
						            dataType: 'json',
						            success: function(data){
						            	if(data==null){
											me.noData();
											me.resetload();
										}else{
											
											$.each(data,function(key,value) {
												$('.tablelist-append').append(value.info)
											});
											last=last+amount;
						            	}
						            	
						            	
						              
						                // 代码执行后必须重置
						                me.resetload();
						            }
						        });
							}
						});

						
					}
				</script>
				
			</div>
			<!--优惠券弹出层-->
			<div class="f_block" id="select_coupon">
				<div class="discount-coupon">
					<h2>
						领取优惠券
						<php>if($_GET['lin']){</php>
							<a class="c-close-attr1" href="{:U('shop/index',array('id'=>$_GET['id'],'type'=>1))}"></a>
						<php>}else{</php>
							<a class="c-close-attr1" href="javascript:void(0)" onclick="close_choose_coupon();"></a>
						<php>}</php>
						
					</h2>
					<ul class="coupon-list">
						<foreach name="coupons" item="v">
							<php>
								if(session('user_id')){
									$rs=get_coupon_user(session('user_id'),$v['coupon_type_id']);
									if($rs['num']>=$rs['max_fetch']){
										$coupon_t='已领取';
									}else{
										$coupon_t='立即领取';
									}
								}else{
									$coupon_t='立即领取';
								}
							</php>
							<li>
								<div class="coupon-info">
									<span class="coupon-money price-color">
										<em>￥{$v.money}</em>
									</span>
									<span class="coupon-condition">{$v.coupon_name}<neq name="v['max_fetch']" value="0">(限领{$v['max_fetch']}张)</neq> </span>
									<span class="coupon-time">使用期限：{:date('Y-m-d',strtotime($v['start_time']))}-{:date('Y-m-d',strtotime($v['end_time']))}</span>
								</div>
								<a href="javascript:void(0);" title="点击领取红包" data-bonus-id="{$v.coupon_type_id}" class="bonus-receive color coupon-btn">{$coupon_t}</a>
							</li>
						</foreach>
					</ul>
				</div>
			</div>

			<!------------------------------底部菜单 start------------------------------->

			<div style="height: 45px;"></div>
			<div class="goods-footer-nav">
				<ul>
					<li>
						<a href="{:U('store/index',array('id'=>$store_info['id']))}">
							<em class="goods-index-nav"></em>
							<span>店铺</span>
						</a>
					</li>
					<!--商品已收藏时给em标签添加selected样式-->
					<li>
						<a href="javascript:void(0);" class="goods-col right collect-goods " data-goods-id="{$_GET['id']}">

							<php>if($rsshopinfo_status==1){</php>
							<em class="goods-collect-nav selected"></em>
							<span>已收藏</span>
							<php>}else{</php>
							<em class="goods-collect-nav"></em>
							<span>收藏商品</span>
							<php>}</php>

						</a>

					</li>
			<style type="text/css">
				#ECS_CARTINFO{
					position: absolute;
					top: -6px;
					color: #fff;
					text-align: center;
					font-weight: normal;
					font-size: 12px;
					width: 25px;
					height: 25px;
					line-height: 25px;
					background: #ff2233;
					border-radius: 50%;
					-webkit-transform-origin-x: 0;
					-webkit-transform: scale(0.65);
			    }
			</style>
					<li>
	
						<a href="{:U('cart/cart_list')}">
							<em class="cart-btn cartbox"  style="background-position: 3px -25px;"></em>
							<em class="global-nav__nav-shop-cart-num" id="ECS_CARTINFO" style="right:0px;">0</em>
							<span>购物车</span>
						</a>

					</li>
				</ul>
				<php>if(!empty($crowdfunding)):</php>
				<dl>
					<dd class="cf_button" style="width: 100%;">
						<a href="javascript:void(0)" class="button" onClick="select_spec('buy-goods')">立即支持</a>
					</dd>
				</dl>
				<php>else:</php>
				<dl>
				<php>
					$nowtime=time();
					if($shop_info['tuanselect']==1&&$shop_info['tuanz_endtime']>$nowtime&&$shop_info['tuanz_starttime']<$nowtime){
				</php>
					
					<dd class="flow">
						<a href="javascript:void(0)" class="button" onClick="select_spec('buy-goods')" style="font-size: 12px;"><em class="SZY-GOODS-PRICE">￥{$shop_info.price}</em>&nbsp;单独购买</a>
					</dd>
					<dd>
						<a href="javascript:void(0)" class="button" onClick="select_spec('kaituan')" style="font-size: 12px;"><em class="SZY-GOODS-PRICE-TUAN">￥{$shop_info.tuan_price}</em> &nbsp;{$shop_info.tuan_num}人开团</a>
					</dd>
				<php>}else{</php>
					<php>if($shop_info['mian_send']==0){</php>
					<dd class="flow">
						<a href="javascript:void(0)" class="button" onClick="select_spec('add-cart')">加入购物车</a>
					</dd>
					<php>}else{</php>
					<dd class="flow" style="background: #b3b2b2;border-color: #eee;">
						<a href="javascript:void(0)" class="button" onClick="select_spec('buy-goods')" style="line-height:20px;">加入购物车<br/><em style="font-size: 12px;">免发货产品请直接购买</em></a>
					</dd>
					<php>}</php>
					<dd>
						<a href="javascript:void(0)" class="button" onClick="select_spec('buy-goods')">立即购买</a>
					</dd>
				<php>}</php>
					

				</dl>
				<php>endif;</php>
			</div>

			<!-- 购物车弹出代码-->
			<section class="f-block spec-menu-hide" id="choose_attr">
				<div class="f-title-attr clearfix">

					<div class="spec-pic">
						<img class="SZY-GOODS-IMAGE-THUMB" src="{$shop_info.image}">
					</div>
					<div class="f-title-arr-right">

						<span class="goodprice SZY-GOODS-PRICE price-color" style="float: left;width: auto;">
						￥{$shop_info.price}</span>
						<php>
							$nowtime=time();
							if($shop_info['tuanselect']==1&&$shop_info['tuanz_endtime']>$nowtime&&$shop_info['tuanz_starttime']<$nowtime){
						</php>
							<span style="font-size: 12px;color: red;float: left;width: auto;height: 21px;line-height: 24px;margin-left: 8px;">( 团购价:<em class="SZY-GOODS-PRICE-TUAN">￥{$shop_info.tuan_price}</em> )</span>
						<php>}</php>
						<span class="SZY-GOODS-NUMBER">库存{$shop_info.num}件</span>

					</div>
					<a class="c-close-attr" href="javascript:close_choose_spec()"></a>
				</div>
				<div class="f-content-attr">
					<ul class="navContent choose" style="display: block;">
						<!-- 产品规格 -->
						<php>if($shop_info['shop_sku']['SKU_Style']){</php>
						<li>
							<div class="title">颜色</div>
							<div class="item attr SKU_Style">
								<!--属性选中状态-->
								<foreach name="shop_info['shop_sku']['SKU_Style']" item="v">
									<a class="goods-style-item <eq name='key' value='0'>hover</eq>" data="{$v.SKU_ThumbImg_M}" href="javascript:void(0);">{$v.modifyValue}</a>
								</foreach>
							</div>
						</li>
						<php>}</php>
						<php>if($shop_info['shop_sku']['SKU_Spec']){</php>
						<li>
							<div class="title">规格</div>
							<div class="item attr SKU_Spec">
								<foreach name="shop_info['shop_sku']['SKU_Spec']" item="v">
									<a class="goods-spec-item <eq name='key' value='0'>hover</eq>" data="{$v.modifyValue}" href="javascript:void(0);">{$v.modifyValue}</a>
								</foreach>
							</div>
						</li>
						<php>}</php>
						<php>if($shop_info['qp_num']>0){
							$qp_num=$shop_info['qp_num'];
						</php>
							<li>
								<div class="title" style="float: left;width: auto;">起拍量</div>
								<div class="item attr SKU_Spec" style="float: left;line-height: 41px; padding-left: 10px;">
									{$shop_info.qp_num}件
								</div>
							</li>
							
						<php>}else{
							$qp_num=1;
						}</php>
						<li>
							<div class="title1">购买数量</div>
							<div class="item1">
								<div class="goods-num amount amount-btn cart-box">
									<i class="decrease amount-minus iconfont">&#xe652;</i>
									<input type="text" class="amount-input num" value="{$qp_num}" data-amount-max="0" maxlength="8" title="请输入购买量" onFocus="this.blur()">
									<i class="increase amount-plus iconfont">&#xe653;</i>
								</div>
							</div>
						</li>
					</ul>

					<div style="height: 10px"></div>
				</div>
				<div class="f-foot">

					<a href="javascript:void(0)" class="SZY-BUY-BUTTON bg-color">确定</a>

				</div>
			</section>

			<section class="mask-div" style="display: none;"></section>
			<!-- 返回顶部 -->
			<a href="javascript:void(0);" id="back-to-top" class="gotop hide"><img src="/themes/wnsc_moblie/newMobile/Shop/picture/topup.png"></a>
		</div>
	</body>

	<script type="text/javascript">
		var sku = {:json_encode($shop_info['shop_sku']['SKU_Form'])};
		var attr_stock = '{$shop_info.num}';
		var goods_number = '{$shop_info.num}';
		$().ready(function() {
			get_attr()
			
			// 缓载图片
			$.imgloading.loading();

			$('.goods-style-item').click(function() {
				var img = $(this).attr('data');
				if(img) {
					$('.SZY-GOODS-IMAGE-THUMB').attr('src', img);
				}
				$(this).siblings().removeClass('hover');
				$(this).addClass('hover');
				get_attr();
			})

			$('.goods-spec-item ').click(function() {
				$(this).siblings().removeClass('hover');
				$(this).addClass('hover');
				
				get_attr();
			})

		});
		function toDecimal2(x) {    
			        var f = parseFloat(x);    
			        if (isNaN(f)) {    
			            return false;    
			        }    
			        var f = Math.round(x*100)/100;    
			        var s = f.toString();    
			        var rs = s.indexOf('.');    
			        if (rs < 0) {    
			            rs = s.length;    
			            s += '.';    
			        }    
			        while (s.length <= rs + 2) {    
			            s += '0';    
			        }    
			        return s;    
			    } 
		//获取属性值
		function get_attr() {
			if($('.SKU_Style .hover')){
				var SKU_Style = $('.SKU_Style .hover').html();
			}else{
				var SKU_Style =null;
			}
			if($('.SKU_Spec .hover')){
				var SKU_Spec = $('.SKU_Spec .hover').html();
			}else{
				var SKU_Spec=null;
			}
			if(sku){
				$.each(sku, function() {
					if(SKU_Style&&SKU_Spec){
						if($(this)[0].sku_spec == SKU_Spec && $(this)[0].sku_style == SKU_Style) {
							var attr_price = $(this)[0].sku_price;
							var attr_stock = $(this)[0].sku_stock;
							var attr_price_tuan = $(this)[0].sku_price_tuan;
                            attr_price_tuan=toDecimal2(attr_price_tuan);
							attr_price=toDecimal2(attr_price);
                            if(attr_price_tuan){
                                $('.SZY-GOODS-PRICE-TUAN').html('￥'+attr_price_tuan);
                            }

							$('.SZY-GOODS-PRICE').html('￥' + attr_price);
							$('.SZY-GOODS-NUMBER').html('库存' + attr_stock + '件');
						}
					}else if(SKU_Style){
						if($(this)[0].sku_style == SKU_Style) {
							var attr_price = $(this)[0].sku_price;
							var attr_stock = $(this)[0].sku_stock;
                            var attr_price_tuan = $(this)[0].sku_price_tuan;
							attr_price=toDecimal2(attr_price);
                            attr_price_tuan=toDecimal2(attr_price_tuan);
                            if(attr_price_tuan){
                                $('.SZY-GOODS-PRICE-TUAN').html('￥'+attr_price_tuan);
                            }
							$('.SZY-GOODS-PRICE').html('￥' + attr_price);
							$('.SZY-GOODS-NUMBER').html('库存' + attr_stock + '件');
						}
					}else if(SKU_Spec){
						if($(this)[0].sku_spec == SKU_Spec) {
							var attr_price = $(this)[0].sku_price;
							var attr_stock = $(this)[0].sku_stock;
                            var attr_price_tuan = $(this)[0].sku_price_tuan;
							attr_price=toDecimal2(attr_price);
                            attr_price_tuan=toDecimal2(attr_price_tuan);
                            if(attr_price_tuan){
                                $('.SZY-GOODS-PRICE-TUAN').html('￥'+attr_price_tuan);
                            }
							$('.SZY-GOODS-PRICE').html('￥' + attr_price);
							$('.SZY-GOODS-NUMBER').html('库存' + attr_stock + '件');
						}
					}
					
					
				});
			}
		
			var guige = '';
			if(SKU_Style) {
				guige = SKU_Style;
				if(SKU_Spec) {
					guige = guige + ',' + SKU_Spec;
				}
			} else {
				if(SKU_Spec) {
					guige = SKU_Spec;
				}
			}
			if(guige) {
				$('.selected-attr-content .i_dd').html(guige);
			} else {
				$('.selected-attr').hide();
			}

		}

		$(function() {

			$(".amount-input").attr("data-amount-min", 1);
			$(".amount-minus").click(function() {
				var amount_input=$('.amount-input').val();
				if((parseInt(amount_input)-1)<=0){
					$('.amount-input').val(1)
				}else{
					$('.amount-input').val(amount_input-1)
				}
			})
			$(".amount-plus").click(function() {
				var amount_input=$('.amount-input').val();
				$('.amount-input').val(parseInt(amount_input)+1)
			})
			
		})
		//图片预加载
		document.onreadystatechange = function() {
			if(document.readyState == "complete") {
				$.imgloading.setting({
					threshold: 1000
				});
				$.imgloading.loading();
			}
		}
	
	</script>
	<script>
		$(document).ready(function() {
			<php>if($daiyan_rs==1){</php>
				layer.msg('抵扣券领取成功，可去个人中心->券包 中查看');
				<php>}</php>
		    //首先将#back-to-top隐藏
			$("#back-to-top").addClass('hide');
			//当滚动条的位置处于距顶部1000像素以下时，跳转链接出现，否则消失
			$(function() {
				$(window).scroll(function() {
					if($(window).scrollTop() > 800) {
						$("#back-to-top").removeClass('hide');
					} else {
						$("#back-to-top").addClass('hide');
					}
				});
				//当点击跳转链接后，回到页面顶部位置
				$("#back-to-top").click(function() {
					$('body,html').animate({
						scrollTop: 0
					}, 600);
					return false;
				});
			});
		});
	</script>

	<script type="text/javascript">
		function replaceUrl(name, value) {
			var obj = new Object();
			obj[name] = value;
			History.replaceState(obj, '', '?' + name + '=' + value);
		}
	</script>
	<script type="text/javascript">
		$(window).on('scroll', function() {
			if($('.user-goods-ka').eq(0).css('display') != 'none') {
				if((scrollTop() + windowHeight()) > $('.user-goods-ka').eq(0).height()) {
					$('#product_desc').show();
					$('#product_canshu').hide();
					$('.goods-header-nav li').removeClass('cur');
					$('.goods-desc-main').removeClass('fixed');
					$('.goods-header-nav li').eq(1).addClass('cur');
					$('.user-goods-ka').eq(1).show();
				} else {
					$('.goods-header-nav li').removeClass('cur');
					$('.goods-header-nav li').eq(0).addClass('cur');
				}
			}
		});

		//获取滚动高度
		function scrollTop() {
			return Math.max(
				//chrome
				document.body.scrollTop,
				//document.getElementsByTagName('goods-content').scrollTop
				//firefox/IE
				document.documentElement.scrollTop
			);
		}
		//获取页面文档的总高度
		function documentHeight() {
			//现代浏览器（IE9+和其他浏览器）和IE8的document.body.scrollHeight和document.documentElement.scrollHeight都可以
			return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
		}
		//获取页面浏览器视口的高度
		function windowHeight() {
			//document.compatMode有两个取值。BackCompat：标准兼容模式关闭。CSS1Compat：标准兼容模式开启。
			return(document.compatMode == "CSS1Compat") ? document.documentElement.clientHeight : document.body.clientHeight;
		}

		$('.goods-header-nav li').click(function() {
			
			$('html,body').scrollTop(0);
			$(this).addClass('cur').siblings().removeClass('cur');
			$('.user-goods-ka').eq($(this).index()).show().siblings('.user-goods-ka').hide();
			if($(this).index() == 1) {
				$('.goods-desc-main').addClass('fixed');
			}
			if($(this).index() == 2) {
				get_comment();
			}
		});

		//点击跳转详情
		$('.scroll-tips').click(function() {
			$('html,body').scrollTop(0);
			$('.goods-header-nav li').removeClass('cur');
			$('.goods-header-nav li').eq(1).addClass('cur');
			$('.user-goods-ka').eq(1).show().siblings('.user-goods-ka').hide();
			
		});

		//点击跳转到评价详情
		$('.sys-btn p').click(function() {
			$('html,body').scrollTop(0);
			$('.goods-header-nav li').removeClass('cur');
			$('.goods-header-nav li').eq(2).addClass('cur');
			$('.user-goods-ka').eq(2).show().siblings('.user-goods-ka').hide();
			
		})

		$('.SZY-BUY-BUTTON').click(function() {
			var buy_goods = $('.SZY-BUY-BUTTON').hasClass('buy-goods');
			var add_cart = $('.SZY-BUY-BUTTON').hasClass('add-cart');
			var kaituan = $('.SZY-BUY-BUTTON').hasClass('kaituan');
			var yanse = $('.SKU_Style .hover').html();
			var guige = $('.SKU_Spec .hover').attr('data');
			var num = $('.goods-num .num').val();
			var id = {$_GET['id']};
		
			var stock_num=$('.SZY-GOODS-NUMBER').html();
			var stock_num=stock_num.replace('库存','');
			var stock_num=stock_num.replace('件','');
			var stock_num=parseInt(stock_num);
			if(stock_num<num){
				layer.msg('库存不足！');
				return;
			}
			if(add_cart) {
				$.post('/cart/add_cart', {
					id: id,
					yanse: yanse,
					guige: guige,
					num: num,
					type:0,
					
				}, function(result) {
					if(result.code == 1) {
						close_choose_spec();
						change_cart(num);
						layer.msg('成功加入购物车！');
					}else{
						layer.msg(result.message);
					}
				}, "json");
			}

			if(buy_goods) {
				$.post('/cart/add_cart', {
					id: id,
					yanse: yanse,
					guige: guige,
					num: num,
					type:0,
					buygood:1,
				
				}, function(result) {
					if(result.code == 1) {
						buy_now()
					}else{
						layer.msg(result.message);
					}
				}, "json");
			}
			
			if(kaituan) {
				$.post('/cart/add_cart', {
					id: id,
					yanse: yanse,
					guige: guige,
					num: num,
					type:1,
					buygood:1,
				}, function(result) {
					if(result.code == 1) {
						buy_now()
					}else{
						layer.msg(result.message);
					}
				}, "json");
			}

		})
			<php>$uid=session('user_id');</php>
		$('.ctuan').click(function() {
					var uid='{$uid}';
					var ctuan_id=$(this).attr('data');
					
					if(uid){
						var yanse = $('.SKU_Style .hover').html();
						var guige = $('.SKU_Spec .hover').attr('data');
						var num = $('.goods-num .num').val();
						var id = {$_GET['id']};
						$.post('/cart/add_cart', {
							id: id,
							yanse: yanse,
							guige: guige,
							num: num,
							ctuan_id:ctuan_id,
							type:1,
							buygood:1,
						}, function(result) {
							if(result.code == 1) {
								buy_now();
							}else{
								layer.msg(result.message);
							}
						}, "json");
					}else{
						self.location = '/user/login';
					}
				})

		function buy_now() {
				$.post('/pay/buy_now', {}, function(result) {
					if(result.code == 1) {
						self.location = '/pay/paymentOrder';
					}
					if(result.code == 2) {
						self.location = '/user/login';
					}
					layer.msg(result.message);
				}, "json");
			}
		function change_cart(num){
			var cart_num=$('#ECS_CARTINFO').html();
			var new_num=parseInt(cart_num)+parseInt(num);
			$('#ECS_CARTINFO').html(new_num);
		}
		$('.collect-goods').click(function() {
			var shop_id = $(this).attr('data-goods-id');
			$.post('/user/collect', {
				id: shop_id,
				type: 1,
			}, function(result) {
				if(result.code == 1) {
					layer.msg(result.message);
					$('.collect-goods em').addClass('selected');
					$('.collect-goods span').html('已收藏');
				} else {
					layer.msg(result.message);
					setTimeout('window.location.href="/user/login"', 1000)
				}
			}, "json");
		});

		$('.collect-store').click(function() {
			var store_id = $(this).attr('store');
			$.post('/user/collect', {
				id: store_id,
				type: 2,
			}, function(result) {
				if(result.code == 1) {
					layer.msg(result.message);
					$('.collect-store em').addClass('collected-shop-bg');
					$('.collect-store span').html('已关注');
				} else {
					layer.msg(result.message);
					setTimeout('window.location.href="/user/login"', 1000)
				}
			}, "json");

		});
		
	</script>
	
	<div id="nativeShare" style="display: none;"></div>
	<div class="code-bg" style="display: none;"></div>
	<div class="code-mask" style="display: none;">
		<div class="code-box">
			<div class="code-close" onclick="close_code_coupon();"></div>
			<div class="code-logo">
				<img src="/themes/wnsc_moblie/newMobile/Shop/images/mall_logo_0.png">
			</div>
			<div class="code-img">
				<div id="qrcode">
					<img src="https://{$_SERVER['HTTP_HOST']}/index/qrcode?url=http://{$_SERVER['HTTP_HOST']}{:U('shop/index',array('id'=>$_GET['id'],'rec_id'=>session('user_id')))}">
				</div>
			</div>
			<h3>截屏保存二维码到手机，分享给好友<br/>或长按复制下方链接，去粘贴给好友吧：</h3>
			<span class="share_url">
				<input type="text"   readonly="readonly" value="https://{$_SERVER['HTTP_HOST']}{:U('shop/index',array('id'=>$_GET['id'],'rec_id'=>session('user_id')))}" />
			</span>
			<div class="code-footer">
				<img src="{$shop_info.image}">
				<div class="code-footer-fr">
					<p>{$shop_info.title}</p>
					<span>￥{$shop_info.price}</span>
				</div>
			</div>
		</div>
	</div>
	<script src="/themes/wnsc_moblie/newMobile/Shop/css/nativeShare.js"></script>
    <link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/nativeShare.css"/>
    <script>
    	var g_url = "https://{$_SERVER['SERVER_NAME']}{:U('shop/index',array('id'=>$_GET['id'],'rec_id'=>session('user_id')))}";
      	<php>if($status){</php>
        
              var config = {
                  url:g_url,
                  title:'【58代言】抵扣{$shop_info.dikouquan}元',
                  desc:'我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下~',
                  img:"https://m.58daiyan.com/static/images/dikouquan.jpg",
                  img_title:"{$web_name}",
                  from:'58代言'
              };
         <php>}else{</php>
       		  var config = {
                url:g_url,
                title:'我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下~',
                desc:'好货好价好服务，一起实惠一起代言，手慢无哟',
                img:"http://{$_SERVER['SERVER_NAME']}{$shop_info.image}",
                img_title:"{$web_name}",
                from:'58代言'
            };
        <php>}</php>
      
        var share_obj = new nativeShare('nativeShare',config);
        <php>$status=get_daiyan($_GET['id']);</php>
        <php>
			$isweixin=is_weixin();
			if($isweixin){
		</php>
			var isweixin=1;
		<php>}else{</php>
			var isweixin=0;
		<php>}</php>
        $(function(){
        	<php>if(session('user_id')){</php>
        	$('.daiyan').click(function(){
              
        		<php>if($status){</php>
                      if(isweixin==1){
                            $('#cover').show();
							$('#guide').show();
                      }else if(isweixin==0){
                        var UA = navigator.appVersion;
	   					var isqqBrowser = (UA.split("MQQBrowser/").length > 1) ? 1: 0;
	   					var isucBrowser = (UA.split("UCBrowser/").length > 1) ? 1 : 0;
	        			if(isqqBrowser||isucBrowser){
	        				$('#nativeShare').show();
	        			}else {
                        	 if(navigator.userAgent.indexOf("Html5Plus") > -1) {
                         		 myshare_daiyan()
                       		 }else
			          			 $(".code-bg").show();
                       			 $('.code-mask').show();
                       			 $("body").addClass("visibly");
			       			 }
                      
                      }
	        		
				<php>}else{</php>
							layer.msg('您只能购买之后，完成收货才可代言！');
				<php>}</php>
			})
        	<php>}else{</php>
        	$('.daiyan').click(function(){
				layer.msg('未登录');
				setTimeout('window.location.href="/user/login"', 1000)
			})
        	<php>}</php>
        	$('#close_share').click(function(){
				$('#nativeShare').hide();
			})
            	$('#cover').click(function(){
					$('#cover').hide();
					$('#guide').hide();
					
			})
        	$('.coupon-btn').click(function(){
				var btn_def=$(this).attr('data-bonus-id');
					$.post('/shop/get_coupons_save', {
						id: btn_def,
					}, function(result) {
						layer.msg(result.message);
						if(result.code==0){
							setTimeout("window.location.href='/user/login.html'",1000);
						}
					}, "json");

			})
        	
        	
        })
        $('#cover').click(function(){
					$('#cover').hide();
					$('#guide').hide();
					
				})
        function close_code_coupon() {
			$(".code-bg").hide();
			$('.code-mask').hide();
			$("body").removeClass("visibly");
		}
    </script>
    	<script type="text/javascript"  src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
		
      	 wx.config({
		      debug: false,//设置调试模式
		      appId: "{$signPackage['appId']}",  //公众号的唯一标识
		      timestamp: '{$signPackage["timestamp"]}',  //生成签名的时间戳
		      nonceStr: '{$signPackage["nonceStr"]}',   //生成签名的随机串
		      signature: '{$signPackage["signature"]}',  //签名
		      jsApiList: [         
		         'onMenuShareTimeline',
		         'onMenuShareAppMessage',
		         'onMenuShareWeibo',
		         'onMenuShareQQ',
		         'onMenuShareQZone',
		         'hideMenuItems',
		         'showMenuItems'      
		         ]   
		    })
		

      	<php>if($status){</php>
        	var title='【58代言】抵扣{$shop_info.dikouquan}元';
       		var	desc='我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下哟~';
             var imgUrl="https://m.58daiyan.com/static/images/dikouquan.jpg";
             var link = "https://m.58daiyan.com{:U('shop/index',array('id'=>$_GET['id'],'rec_id'=>session('user_id')))}";
         <php>}else{</php>
       		 var title='我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下哟~';
        	 var desc='好货好价好服务，一起实惠一起代言，手慢无哟';
             var imgUrl="https://m.58daiyan.com{$shop_info.image}";
             var link = "https://m.58daiyan.com{:U('shop/index',array('id'=>$_GET['id']))}";
        <php>}</php>
       
        
		   wx.ready(function(){
		      wx.onMenuShareTimeline({
		         title: title,
		         link: link,
		         imgUrl: imgUrl,
		         trigger: function (res) {
		 
		         },
		         success: function (res) {
		            layer.msg('分享成功'+link);  
		            $('#cover').hide();
					$('#guide').hide();
					again_tip();
		         },
		         cancel: function (res) {
		         	 layer.msg('您已取消分享');
		         	 $('#cover').hide();
					$('#guide').hide();
		                
		         }
		      });
		 
		      wx.onMenuShareAppMessage({
		         title: title,
		         desc: desc,
		         link: link,
		         imgUrl: imgUrl,
		         success: function (res) {
		            layer.msg('分享成功'); 
		            $('#cover').hide();
					$('#guide').hide();
					
		            },
		         cancel: function (res) {
		            layer.msg('您已取消分享');
		            $('#cover').hide();
					$('#guide').hide();
		            }
		      });
		 
		      wx.onMenuShareWeibo({
		         title: title,
		         desc: desc,
		         link: link,
		         imgUrl: imgUrl,
		         success: function () {
		           layer.msg('分享成功'); 
		           $('#cover').hide();
					$('#guide').hide();
				
		            },
		         cancel: function () {
		           layer.msg('您已取消分享'); 
		           $('#cover').hide();
					$('#guide').hide();
		            }
		      });
		 
		      wx.onMenuShareQQ({
		         title: title,
		         desc: desc,
		         link: link,
		         imgUrl: imgUrl,
		         success: function () {
		            layer.msg('分享成功'); 
		            $('#cover').hide();
					$('#guide').hide();
					
		          },
		         cancel: function () {
		           layer.msg('您已取消分享');
		            $('#cover').hide();
					$('#guide').hide();
		         }
		      });
		   });
      </script>
      <?php
        $agent=$_SERVER['HTTP_USER_AGENT'];
        if(strpos($agent,"Html5Plus")  > -1&&isweixin==0){
        ?>
   	<script>
			function myshare(){
			
				 if(navigator.userAgent.indexOf("Html5Plus") > -1) {
					//5+ 原生分享
					window.plusShare({
						title: "{$web_name}",//应用名字
						content: "我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下~",
						href: location.href,//分享出去后，点击跳转地址
						thumbs: ["https://{$_SERVER['SERVER_NAME']}{$shop_info.image}"] //分享缩略图
					}, function(result) {
						//分享回调
					});
				}
			}
          function myshare_daiyan(){
			
				 if(navigator.userAgent.indexOf("Html5Plus") > -1) {
					//5+ 原生分享
					window.plusShare({
						title: "【58代言】抵扣{$shop_info.dikouquan}元",//应用名字
						content: "我在@{$web_name} 发现了一个非常不错的商品：{$shop_info.title}。感觉不错，分享一下~",
						href:"http://{$_SERVER['SERVER_NAME']}{:U('shop/index',array('id'=>$_GET['id'],'rec_id'=>session('user_id')))}",//分享出去后，点击跳转地址
						thumbs: ["https://m.58daiyan.com/static/images/dikouquan.jpg"] //分享缩略图
					}, function(result) {
						//分享回调
					});
				}
			}
		</script>
            <?php
          }
         ?>
          
           <?php
           if($_GET['type']=='daiyan'){
         ?>
      	<script type="text/javascript">
          	$(function(){
            	$('.daiyan').trigger("click");
            })
         </script>
		<?php
          }
         ?>
		<div id="cover"></div>
		<div id="guide"><img src="/themes/wnsc_moblie/newMobile/User/images/guide1.png"></div>
	<!-- 底部 _end-->

</html>